$(function() {
	render();
	$(".update-btn").click(function() {
		render();
	});
	$("#dateChoose").change(function(){
		render();
	});
	function renderAgentStatus(data) {
		$("#job_statistics").empty().prepend($.renderTmpl("jobstatistics", data));
	}
	function render() {
		var dateChoose=$("#dateChoose").val();
		$.get(path + "/job/jobstatistics?dateChoose="+dateChoose, function(data) {
			renderAgentStatus(data);
		});
		setInterval(render,2*60*1000);
	}
});
